﻿namespace EasyWeb.Test
{
    using EasyWeb.Data;
    using EasyWeb.Data.EntityFramework;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    public abstract class LibraryTest : BaseTest
    {
        protected IEWConfigurationDao ConfigurationDao { get; private set; }

        protected IEWCultureDao CultureDao { get; private set; }

        protected IEWEntityDefinitionDao EntityDefinitionDao { get; private set; }

        protected IEWFieldDefinitionDao FieldDefinitionDao { get; private set; }

        protected IEWSelectionDefinitionDao SelectionDefinitionDao { get; private set; }

        protected IEWSelectionItemDefinitionDao SelectionItemDefinitionDao { get; private set; }

        [TestInitialize]
        public override void TestInitialize()
        {
            base.TestInitialize();

            this.ConfigurationDao = new EWConfigurationDao();
            this.CultureDao = new EWCultureDao();
            this.EntityDefinitionDao = new EWEntityDefinitionDao();
            this.FieldDefinitionDao = new EWFieldDefinitionDao();
            this.SelectionDefinitionDao = new EWSelectionDefinitionDao();
            this.SelectionItemDefinitionDao = new EWSelectionItemDefinitionDao();
        }

        [TestCleanup]
        public override void TestCleanup()
        {
            base.TestCleanup();
        }
    }
}
